﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Security;

namespace TimeCheque
{
    public class User
    {
        public int UserID { get; set; }

        /// <summary>
        /// First Name of the given User
        /// </summary>
        public string FirstName { get; set; }

        /// <summary>
        /// Last Name of the user
        /// </summary>
        public string LastName { get; set; }


        /// <summary>
        /// Email Address of the user
        /// </summary>
        public string Email { get; set; }


        /// <summary>
        /// Password for the user
        /// </summary>
        public string Password { get; set; }



        /// <summary>
        /// Attempts a login for a given username and password
        /// </summary>
        /// <param name="Email">Email Address</param>
        /// <param name="Password">Password</param>
        /// <param name="User">User obj if login correct</param>
        /// <returns>login success</returns>
        public static bool Login(string Email, string Password, out User user)
        {
            user = null;
            bool output = false;
            if (Email.Contains("succeed"))
            {
                user = new User() { FirstName = "Geroge", LastName = "fred", Email = Email, UserID = 1 };
                return true;
            }

            return output;
        }
    }
}
